const
    express = require('express'),
    router = express.Router();

//引入处理模块:
let userController = require('../controller/userController');

router.get('/',(req,res)=>{
    res.send('user首页')

})

router.get('/register',(req,res)=>{
    res.render('user/register')

})


//获取到从注册页面传过来的数据:
router.post('/addUser',userController.handlePostUser)

router.get('/login',(req,res)=>{
    res.render('user/login')

})

router.get('/logout',userController.handleLogout)

router.post('/dologin',userController.handleLogin)

module.exports = router;